'''
digital_root
'''
def digital_root(num):
	x = 0
	while num >= 0:
		x += num%10
		num //= 10
		if num == 0:
			break
	if len(str(x)) > 1:
		digital_root(x)
	else:
		print(x)

digital_root(184)

# list()强制转换成list
# map(function, list)function 对数组的每个元素都作用一遍，联想一下filter